<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>footer</title>
</head>
<body>
<div class="footer" th:fragment="footer">
    <div class="pull-right">
        &copy; 2018-2019 <a href="http://www.xiaooo.cn/" target="_blank">圈圈科技</a>
    </div>
    <span id="my_timer" style="float: left; margin-left: 10px">
        <script>
            function myTimer() {
                var inn = document.getElementById('my_timer');
                var date = new Date();
                var month = date.getMonth() + 1;
                var year = date.getFullYear();
                var day = date.getDate();
                var week = date.getDay();
                var hour = date.getHours() + "";
                if (hour.length == 1) {
                    hour = "0" + hour
                }
                var min = date.getMinutes() + "";
                if (min.length == 1) {
                    min = "0" + min
                }
                var sec = date.getSeconds() + "";
                if (sec.length == 1) {
                    sec = "0" + sec
                }
                var week1;
                switch (week) {
                    case 0:
                        week1 = '星期日';
                        break;
                    case 1:
                        week1 = '星期一';
                        break;
                    case 2:
                        week1 = '星期二';
                        break;
                    case 3:
                        week1 = '星期三';
                        break;
                    case 4:
                        week1 = '星期四';
                        break;
                    case 5:
                        week1 = '星期五';
                        break;
                    case 6:
                        week1 = '星期六';
                        break;
                }
                inn.innerHTML = year + '年' + month + '月' + day + '日 ' + week1 + ' ' + hour + ':' + min + ':' + sec + " ";
                var innn = inn.innerHTML;
                setTimeout(myTimer, 1000);
            }
            myTimer();
        </script>
    </span>
</div>
</body>
</html>